<% iam_policy_attachments.each do |policy_attachment| -%>
resource "aws_iam_policy_attachment" "<%= module_name_of(policy_attachment) %>" {
    name       = "<%= policy_attachment[:name] %>"
    policy_arn = "<%= policy_attachment[:arn] %>"
    groups     = <%= policy_attachment[:entities].policy_groups.map(&:group_name).inspect %>
    users      = <%= policy_attachment[:entities].policy_users.map(&:user_name).inspect %>
    roles      = <%= policy_attachment[:entities].policy_roles.map(&:role_name).inspect %>
}

<% end -%>
